﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FrogEngine
{
	public class PriorityQueue<K, V>
		where K : IComparable
	{
		public PriorityQueue()
		{
			heap = new BinaryHeap<K, V>();
		}

		private BinaryHeap<K, V> heap;

		public int Size
		{
			get { return heap.Size; }
		}

		public bool IsEmpty
		{
			get { return heap.IsEmpty; }
		}

		public K MinKey
		{
			get { return heap.MinKey(); }
		}

		public V MinElement
		{
			get { return heap.MinElement(); }
		}

		public bool ContainsElement(V item)
		{
			return heap.ContainsElement(item);
		}

		public void ChangeKey(V item, K newKey)
		{
			heap.ChangeKey(item, newKey);
		}

		public K GetKey(V value)
		{
			return heap.GetKey(value);
		}

		public void InsertItem(K key, V value)
		{
			heap.InsertItem(key, value);
		}

		public void RemoveMin()
		{
			heap.RemoveMin();
		}
	}
}
